
<div class="widget category product-1">
    <div class="gradient">
        <div class="label">
            <a class="product-1" 
               href="javascript:void(0)">
                   <?php echo $label ?>
            </a>
        </div>
        <div class="content">
            <ul class="list">
                <?php foreach ($categories as $cat): ?>
                    <li class="item">
                        <div class="gradient">
                            <?php if ($cat['childCategories'] === null) : ?>
                                <a href="<?php echo $this->createUrl('product/list', array('categoryid' => $cat['id'], 'categorykey' => $cat['seokey'], 'page' => 1)) ?>">
                                    <?php echo $cat['name'] ?>
                                </a>
                            <?php endif; ?>
                            <?php
                            if ($cat['childCategories'] !== null) :
                                $categories = $cat['childCategories'];
                                ?>
                                <a href="<?php echo $this->createUrl('product/list', array('categoryid' => $cat['id'], 'categorykey' => $cat['seokey'], 'page' => 1)) ?>">
                                    <?php echo $cat['name'] ?>
                                </a>
                                <div class="dropdown">
                                    <div>
                                        <ul class="menu">
                                            <?php foreach ($categories as $category): ?>
                                                <li class="menu-item">
                                                    <div class="gradient">
                                                        <a href="<?php echo $this->createUrl('product/list', array('categoryid' => $category['id'], 'categorykey' => $category['seokey'], 'page' => 1)) ?>">
                                                            <?php echo $category['name'] ?>
                                                        </a>
                                                    </div>
                                                </li>
                                            <?php endforeach ?>
                                        </ul>
                                    </div>
                                </div>
                                <style type="text/css">
                                    #_section .gradient a:hover{
                                        color: #FAA732;
                                    }
                                </style>
                            <?php endif; ?>
                        </div>
                    </li>
                <?php endforeach ?>
            </ul>
        </div>
    </div>
</div>
